package com.tgpms.web.earlierStage.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.tgpms.web.earlierStage.entity.DocSortTemplate;

/**
* 表DOC_SORT_TEMPLATE -> null 的基本功能实现
*
* @author newway
* @createDate 2019/11/26
*/
@Mapper
public interface DocSortTemplateMapper {
	
	//根据任务ID删除文档模板
	@Delete("delete from DOC_SORT_TEMPLATE where TASK_ID = #{taskId}")
	int deleteDocSortTempByTaskId(@Param("taskId")String taskId);
	
	//条件查询
	List<DocSortTemplate> selDocSortTemplate(@Param("map")Map<String, Object> map);
	
    /**
     * null  deleteByPrimaryKey 实现
     * 
     * @param dstId
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    int deleteByPrimaryKey(String dstId);

    /**
     * null  insert 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    int insert(DocSortTemplate record);

    /**
     * null  insertSelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    int insertSelective(DocSortTemplate record);

    /**
     * null  selectByPrimaryKey 实现
     * 
     * @param dstId
     * @return null com.tgpms.web.earlierStage.entity.DocSortTemplate
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    DocSortTemplate selectByPrimaryKey(String dstId);

    /**
     * null  updateByPrimaryKeySelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    int updateByPrimaryKeySelective(DocSortTemplate record);

    /**
     * null  updateByPrimaryKey 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 18:07:11
     */
    int updateByPrimaryKey(DocSortTemplate record);
    
    //通过唯一键查询
    DocSortTemplate selByUniqueKey(@Param("taskId")String taskId,@Param("sortId")String sortId);
}